package com.hwc.demo.mbs.bean.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Entity
@Table(name = "tb_student")
@SuppressWarnings("serial")
@NoArgsConstructor
@Data
@Accessors(chain = true)
public class Student implements Serializable{
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	protected Integer id; //无业务意义自增主键
	
	@Column(name = "create_time")
	protected LocalDateTime createTime; //创建时间
	
	@Column(name = "update_time")
	protected LocalDateTime updateTime; //修改时间
	
	@Column(columnDefinition = "tinyint default 1")
	protected Integer status = 1; //是否有效  0 1 （逻辑删除字段）
	
	@Column(columnDefinition = "int default 0")
	protected Integer version; //版本号
	
	
	/*
	 * 以下为业务字段
	 */
	@Column(length = 20)
	private String name;
	
	@Column(name = "class_id", columnDefinition = "tinyint")
	private Integer classId;
}
